<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>webrtc</title>
    <style>
        #yours{
            width:300px;
            position:absolute;
            top:200px;
            left:100px;
        }
        #theirs{
            width:300px;
            position:absolute;
            top:200px;
            left:400px;
        }
    </style>
</head>
<body>
<button onclick="createOffer()">开始视频</button>
<video id="yours" autoplay></video>
<video id="theirs" autoplay></video>

</body>

<script type="text/javascript" src="../blog/plugin/jquery/1.9.1/jquery.min.js"></script>
<script src="webtrc.js"></script>
<script>
    // var userId2;
    // var receiver;
    // $(function () {
    //     f();
    //     getUser();
    //     receiver = getUrlParam("receiver");
    // })
    //
    // function getUser() {
    //     $.getJSON("/api/user/findUserInfo",function(data){
    //         userId2 = data.id;
    //     })
    // }
    //
    // function getUrlParam(name) {
    //     var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
    //     var paramName = window.location.search.substr(1).match(reg);
    //     if(paramName != null){
    //         return decodeURIComponent(paramName[2]); //decodeURIComponent 处理中文乱码
    //     }
    //     return null;
    // }
</script>
</html>